<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="button" value="没点到">
    <input type="button" value="没点到">
    <input type="button" value="没点到">
    <input type="button" value="没点到">
    <input type="button" value="没点到">
    <input type="button" value="没点到">
</body>
<script>
    let btnArr = document.getElementsByTagName('input');
    console.log(btnArr);
    for (let i = 0; i < btnArr.length; i++) {
        btnArr[i].onclick = function () {
            for (let j = 0; j < btnArr.length; j++) {
                btnArr[j].value = '点到了';
            }
            btnArr[i].style.color = 'red';
            btnArr[i].style.backgroundColor = 'pink';
            btnArr[i].style.border = '0';
        }
    }
</script>

</html>